package com.etlmaster.executor.processors.File;

import java.io.Serializable;


/**
 * 文件扫描对象
 * @author Larry
 * @copyright Larry@etlMaster
 * @since 2017-09-10
 */
public class FileScanInfo implements Serializable{

	private String vfsServer;
	private String relativePath;
	private String fileName;
	private long fileSize;
	private long lastModifiedTime;//文件最后修改时间
	private long foundTime = System.currentTimeMillis();//文件发现时间
	public FileScanInfo(String vfsServer, String relativePath, String fileName,long fileSize, long lastModifiedTime) {
		super();
		this.vfsServer = vfsServer;
		this.relativePath = relativePath;
		this.fileName = fileName;
		this.fileSize = fileSize;
		this.lastModifiedTime = lastModifiedTime;
	}
	public String getVfsServer() {
		return vfsServer;
	}
	public void setVfsServer(String vfsServer) {
		this.vfsServer = vfsServer;
	}
	public String getRelativePath() {
		return relativePath;
	}
	public void setRelativePath(String relativePath) {
		this.relativePath = relativePath;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public long getFileSize() {
		return fileSize;
	}
	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}
	public long getLastModifiedTime() {
		return lastModifiedTime;
	}
	public void setLastModifiedTime(long lastModifiedTime) {
		this.lastModifiedTime = lastModifiedTime;
	}
	public long getFoundTime() {
		return foundTime;
	}
	public String getVfsURI() {
		if(vfsServer.endsWith("/")){
			return vfsServer.substring(0, vfsServer.length()-1)+relativePath;
		}else{
			return vfsServer+relativePath;
		}
	}
}